<!DOCTYPE html>
<html>
<head>
    <title>For Statement Example 1</title>
    <script type="text/javascript">
        var count = 10;
        for (var i=0; i < count; i++){
            alert(i);
        }

        /* The preceding is the same as:
        
        var count = 10;
        var i = 0;
        while (i < count){
            alert(i);
            i++;
        }
        
        */
    </script>

</head>
<body>
  
</body>
</html>